//
//  CAIPluginsManager.h
//  CAIPluginsManager
//
//  Created by simon on 2022/1/13.
//

#import <Foundation/Foundation.h>
#import <CAINetworkManager/NetworkManager.h>
#import "CAIPluginModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface CAIPluginsManager : NSObject


/// 轮训时间间隔
@property (nonatomic, assign) NSTimeInterval pluginTimeInterval;

/// 是否开启轮训，默认YES；
@property (nonatomic, assign) BOOL isStartPolling;

/// 获取插件列表-轮训请求
/// @param module 指定模块名；如果nil，则返回全部，一般不用；
/// @param success success description
/// @param failureBlock failureBlock description
- (void)getPluginsWithModule:(nullable NSString *)module
                     success:(nullable void(^)(NSArray <PluginsModel *> *plugins))success
                failureBlock:(nullable void(^)(CHSNetworkMetaModel *meta))failureBlock;

@end

NS_ASSUME_NONNULL_END
